<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<?php $this->load->helper('HTML');
echo link_tag('css/style2.css');
echo link_tag('images/favicon.ico','shortcut icon','image/x-icon');
?>
</head>
<?php

header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=penjualan_mingguan.xls");
header("Pragma: no-cache");
header("Expires: 0");

?>
<body>
<table width="1500" align="center" border="1">
	<tr>
		<th colspan='3'>week ke-<?php echo $week?></th>
		<th></th>
    </tr>
	<tr>
		<th width='50'>No.</th>
		<th width='200'>Nama Cabang</th>
		<th width='300'>Total Omset</th>
    </tr>
	<?php 
		$i = 1;
		foreach($default as $row){
			echo "<tr>";
			echo "<td>".$i++."</td>";
			echo "<td colspan='1'>".$row->strnama_cabang."</td>";
			if(!empty($row->totalomset)){
				echo "<td align='right'>".$row->totalomset."</td>";
			}else{
				echo "<td align='right'>0</td>";
			}
			echo "</tr>";
		}?>
		<tr>
		<td colspan="3"><small>Diambil dari tabel Nota, Cabang, Nota_detail. fokus kepada inttotal_omset.</small></td></tr>
</table>
</body>
</html>
